// store/type/ActionWrapper.hpp

#ifndef ACTIONWRAPPER_HPP
#define ACTIONWRAPPER_HPP

#include <QObject>
#include <QMetaType>
#include <QHash>

// 定义动作包装类
class ActionWrapper {
    Q_GADGET

public:
    // 定义动作类型枚举
    enum class ActionType {
        SetBasic,InitBasic,EditBasic,   // 基础数据
        SetSynthetic, InitModify, EditModify // 合并数据
    };
    Q_ENUM(ActionType)

    // 定义状态键枚举
    enum class StateKey {
        Basic,
        Synthetic
    };
    Q_ENUM(StateKey)
};

Q_DECLARE_METATYPE(ActionWrapper::ActionType)
Q_DECLARE_METATYPE(ActionWrapper::StateKey)

// 为 ActionWrapper::StateKey 定义 qHash 函数
inline uint qHash(ActionWrapper::StateKey key, uint seed = 0) noexcept {
    return ::qHash(static_cast<uint>(key), seed);
}

#endif // ACTIONWRAPPER_HPP
